<?php
/*
 * 车型库导航条
 * @package    auto
 * @author     YuNian, mark
 * @copyright  Copyright (c) 2013 ixdcw team
 * @version    $Id: a4608084120e6ec86e23ae61c237f469015f5d5e $
 */
defined('IN_IXDCW') or exit('Access Denied');

if($modelId || $modelid) {
	if($modelid) $modelId = $modelid;
}else{
	$modelId = 0;
}

if($carId || $carid) {
	if($carid) $carId = $carid;
}else{
	$carId = 0;
}

$brandId      = isset($brandId) ? intval($brandId) : 0;
$manufactorId = isset($manufactorid) ? intval($manufactorid) : 0;
$headerPart   = isset($headerPart) ? strval($headerPart) : 'main';

if ($modelId) {
	$modelInfo    = AutoModel::get($modelId);
	$carId        = $modelInfo['arcid'];
	$brandId      = $modelInfo['arbid'];
	$manufactorId = $modelInfo['armid'];
}

if (!$manufactorId && $carId) {
	$manufactorId = AutoCar::getManufactorId($carId);
}
if ($manufactorId) {
	$manufactorInfo = AutoManufactor::get($manufactorId);
}

if (!$brandId && $carId) {
	$brandId   = AutoCar::getBrandId($carId);
}

Auto::decide404($carId);

$blank = '暂无';
$carInfo   = AutoCar::get($carId);
$brandInfo = AutoBrand::get($brandId);


